Skip to content

chore: add react-native compat - #70

Open
shamilovtim wants to merge 1 commit into
achingbrain:mainfrom
shamilovtim:tshamilov/react-native-compat
Open

chore: add react-native compat#70
shamilovtim wants to merge 1 commit into
achingbrain:mainfrom
shamilovtim:tshamilov/react-native-compat

Conversation

@shamilovtim

Copy link
Copy Markdown

No description provided.

@achingbrain

Copy link
Copy Markdown
Owner

I'm guessing this PR is necessary because you're having problems importing modules as react-native doesn't support the exports map?

It looks like support was added recently - have you tried turning these settings on?

@shamilovtim

Copy link
Copy Markdown
Author

I'm guessing this PR is necessary because you're having problems importing modules as react-native doesn't support the exports map?

It looks like support was added recently - have you tried turning these settings on?

Exports support is experimental and doesn't work well when multiple isomorphic packages exist in the repo. Some use exports for node, while others use exports for web. Trying to use exports in RN would significantly modify our bundle selection. The best thing a package maintainer can do is select the correct bundle they want to ship to react native and supply it through the "react-native" directive. That's why I went with that approach in these PRs and why we don't plan to enable exports.

@achingbrain

Copy link
Copy Markdown
Owner

From what I can see, the react-native directive does not support multiple entry points to a module like exports does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants